.app-container {
  position: relative;
}

/* 宇宙背景 */
.universe-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at bottom, #1b2735 0%, #090a0f 100%);
  z-index: -2;
}

.stars {
  .star {
    position: absolute;
    background: #fff;
    border-radius: 50%;
    animation-name: twinkle;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    opacity: 0.2;
  }
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.2;
  }
  50% {
    opacity: 1;
  }
}

/* 顶部导航条 */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  z-index: 100;
  background: rgba(10, 14, 23, 0.7);
  backdrop-filter: blur(10px);

  .logo {
    font-size: 24px;
    font-weight: bold;
    background: linear-gradient(45deg, #6e45e2, #88d3ce);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  .search-bar {
    flex: 0 0 40%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 3px 15px;
    display: flex;
    align-items: center;
  }
}
 .search-bar /deep/ .el-input__inner {
   background: rgba(255, 255, 255, 0);
   color: #fff !important; 
  }
/* 侧边导航栏 */
.side-nav {
  position: fixed;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 80px;
  height: 580px;
  background: #1a1a1a;
  border-radius: 20px;
  padding: 20px 10px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  overflow: hidden;



  .nav-menu {
    width: 100%;
    border: none;
    margin: 0;
    padding: 0;

    .el-menu-item {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      height: 70px;
      border-radius: 12px;
      cursor: pointer;
      transition: all 0.3s ease;
      margin-bottom: 10px;
      color: #ccc;
      font-size: 14px;
      text-align: center;
      position: relative;

      &:hover {
        background: rgba(255, 255, 255, 0.05);
        transform: scale(1.02);
      }

      &.is-active {
        background: #6e45e2 !important;
        color: white !important;
        transform: scale(1.05);
      }

      .menu-icon {
        font-size: 20px;
        color: inherit;
        position: absolute;
        top: -10px;
        left: 15px;
      }

      .menu-text {
        position: absolute;
        top: 40px;
        left: 15px;
        font-size: 14px;
        color: inherit;
        line-height: 1.2;
      }
    }
  }
}

  ::v-deep .el-menu {
    background: rgba(255, 255, 255, 0);
  }
/* 探索页 tab 标签 */
.explore-tabs {
  position: fixed;
  top: 85px;
  left: 50%;
  color: #fff;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 5px;
  padding: 10px 30px 0 30px;
  z-index: 80;

  &.active {
    display: flex;
  }

  ::v-deep .el-tabs__active-bar {
    display: inline-block;
    margin-left: 5px;
    width: 20px !important;
  }

  ::v-deep .el-tabs__nav-wrap::after {
    height: 0 !important;
    position: static !important;
  }

  ::v-deep .el-tabs__item {
    font-size: 14px;
    color: #fff;
    border-bottom: none !important;
  }

  ::v-deep .el-tabs__header {
    border-bottom: none !important;
  }

  ::v-deep .el-tabs__item.is-active {
    color: #0066cc !important;
    font-weight: bold;
  }
}

/* 内容区域 */
.content-wrapper {
  position: absolute;
  top: 130px;
  left: 30px;
  right: 30px;
  bottom: 30px;
  overflow: hidden;
  z-index: 10;

  .content {
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;

    &::-webkit-scrollbar {
      display: none;
    }

    .work-item {
      scroll-snap-align: start;
      width: 100%;
      flex-shrink: 0;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      position: relative;
      box-sizing: border-box;

      .image-container {
        width: 85%;
        overflow: hidden;
        border-radius: 20px;
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: grab;
      }

      .work-image {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        height: 100%;
        max-width: 100%;
        object-fit: contain;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.4s ease-in-out;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;

        &.active {
          opacity: 1;
        }
      }

      .image-indicator {
        position: absolute;
        bottom: 15px;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        gap: 10px;
        z-index: 3;

        .indicator-dot {
          width: 10px;
          height: 10px;
          border-radius: 50%;
          background: rgba(255, 255, 255, 0.5);

          &.active {
            background: #fff;
            transform: scale(1.2);
          }
        }
      }

      .work-info-panel {
        position: absolute;
        bottom: 20px;
        left: 20px;
        display: inline-block;
        max-width: 35%;
        padding: 12px 16px;
        color: white;
        border-radius: 12px;
        z-index: 10;
        font-size: 14px;
        line-height: 1.4;
        word-break: break-word;

        .work-title {
          font-weight: 600;
          font-size: 15px;
          margin-bottom: 4px;
          white-space: nowrap;
          overflow: hidden;
          text-overflow: ellipsis;
        }

        .work-meta {
          font-size: 12px;
          opacity: 0.8;
          margin-bottom: 8px;
        }

        .prompt-row {
          display: flex;
          align-items: flex-start;
          gap: 6px;
          font-size: 13px;
          line-height: 1.4;
          flex-wrap: wrap;

          .eye-icon {
            flex-shrink: 0;
            font-size: 16px;
          }

          .prompt-text {
            flex: 1;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            word-break: break-word;
            font-size: 13px;
            line-height: 1.8;

            &.expanded {
              -webkit-line-clamp: unset !important;
              overflow: auto !important;
              max-height: 200px !important;
              padding-right: 5px;
            }
          }

          .expand-btn {
            flex-shrink: 0;
            color: #ff7a5c;
            cursor: pointer;
            font-size: 13px;
            margin-left: 4px;
            display: none;
          }
        }

        .action-row {
          display: flex;
          gap: 8px;
          margin-top: 6px;

          .unlock-btn,
          .draw-same-btn {
            flex: 1;
            padding: 6px 10px;
            background: #ff7a5c;
            color: white;
            border: none;
            border-radius: 6px;
            font-size: 13px;
            cursor: pointer;
            white-space: nowrap;
            width: 200px;

            &:hover {
              background: #ff5c44;
            }
          }
        }
      }

      .action-panel {
        position: absolute;
        width: 100px;
        bottom: 16px;
        right: 16px;
        z-index: 3;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;

        .avatar-wrapper {
          position: relative;
          width: 50px;
          height: 50px;
          margin-bottom: 8px;

          .avatar {
            width: 100%;
            height: 100%;
            border-radius: 50%;
            object-fit: cover;
            border: 2px solid white;
          }

          .follow-badge {
            position: absolute;
            right: -6px;
            bottom: -2px;
            width: 18px;
            height: 18px;
            background: #ff4d4f;
            color: white;
            font-size: 12px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
          }
        }

        .action-row {
          flex-direction: column;
          gap: 8px;
          margin-bottom: 8px;
        }

        .action-btn {
          background: transparent;
          border: none;
          padding: 0;
          cursor: pointer;
          font-size: 26px;
          display: flex;
          flex-direction: column;
          align-items: center;
          position: relative;
          transition: transform 0.2s ease, color 0.3s;
          margin-bottom: 10px;

          .icon {
            width: 28px;
            height: 28px;
            display: block;
            font-size: inherit;
            transition: transform 0.2s, opacity 0.3s;
          }

          &:focus,
          &:hover {
            .icon {
              transform: scale(1.2);
              color: #ff6a88;
            }
          }

          &.liked .icon {
            color: #ff4d4f;
          }

          &.favorited .icon {
            color: gold;
          }

          .count {
            font-size: 12px;
            color: white;
          }
        }
      }
    }
  }
}

/* 评论面板 */
.sidebar-panel-container {
  position: fixed;
  top: 70px;
  right: -400px;
  width: 400px;
  height: calc(100vh - 70px);
  background: #1a1a1a;
  box-shadow: -5px 0 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  transition: right 0.3s ease;
  overflow: hidden;
  pointer-events: none;

  &.open {
    right: 0;
    pointer-events: auto;
  }

  .comment-panel {
    display: flex;
    flex-direction: column;
    height: 100%;

    .comment-header {
      padding: 10px;
      display: flex;
      flex-shrink: 0;
      align-items: center;
      justify-content: space-between;

      span {
        font-size: 15px;
        font-weight: bold;
        color: #fff;
        flex: 1;
        text-align: center;
      }

      .close-btn {
        margin-right: 10px;
        font-size: 25px;
        background: none;
        border: none;
        cursor: pointer;
        color: #fff;
      }
    }

    .comment-list {
      flex: 1;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
      z-index: 1;
    }

    .input-wrapper {
      flex-shrink: 0;
      padding: 20px 10px;
      border-top: 1px solid #333;
      background: #222;
      display: flex;
      align-items: center;
      gap: 10px;
      position: sticky;
      z-index: 1;

      ::v-deep .el-input {
        flex: 1;
      }

      .send-comment {
        padding: 6px 12px;
        background: #ff7a5c;
        color: white;
        border: none;
        border-radius: 4px;
        cursor: pointer;

        &:hover {
          background: #ff5c44;
        }
      }
    }
  }
}

/* 滚动条 */
.custom-scrollbar {
  &::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 10px;
  }

  &::-webkit-scrollbar-thumb {
    background: rgba(120, 120, 120, 0.4);
    border-radius: 10px;
    transition: all 0.3s ease;

    &:hover {
      background: rgba(120, 120, 120, 0.7);
      transform: scaleX(1.1);
    }

    &:active {
      background: rgba(120, 120, 120, 0.9);
    }
  }

  &::-webkit-scrollbar-button {
    display: none;
  }
}
::v-deep .el-input__inner {
  background: rgba(255, 255, 255, 0);
  color: #fff !important;
}